package jnpf.mapper;


import jnpf.entity.ZXGL_LiXiangGuanLiEntity;
import jnpf.entity.ZXGL_XiangMuLiXiang_MingXiEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ZXGL_XiangMuLiXiang_MingXi
 * 版本： V2.0
 * 版权： 河北交投智能交通技术有限责任公司
 * 作者： 数字交投项目组
 * 日期： 2025-03-17
 */
public interface ZXGL_XiangMuLiXiang_MingXiMapper extends BaseMapper<ZXGL_XiangMuLiXiang_MingXiEntity> {

    @Select("SELECT xmmc FROM ZXGL_XiangMuLiXiang_MingXi LEFT JOIN ZXGL_LiXiangGuanLi ON ZXGL_LiXiangGuanLi.id = ZXGL_XiangMuLiXiang_MingXi.mainid WHERE ZXGL_XiangMuLiXiang_MingXi.xmmc = '${name}' AND ZXGL_LiXiangGuanLi.sftj = 1 and ZXGL_LiXiangGuanLi.id <> '${id}'")
    List<String> findByName(@Param("name") String name, @Param("id") String id);

    List<ZXGL_XiangMuLiXiang_MingXiEntity> selectAll(@Param("xmmc") String xmmc, @Param("userId") String userId);


}
